package com.mayikt.template;

import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 使用ThreadLocal存放参数
 */
@Component
public class PayThreadInfoHolder {
    private ThreadLocal<Map<String, String>> payThreadLocal = new ThreadLocal();

    public void setRequestParams(Map<String, String> requestParams) {
        payThreadLocal.set(requestParams);
    }

    public Map<String, String> getRequestParams() {
        return payThreadLocal.get();
    }
}